<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="html" indent="no"/>
	<!-- template matching root -->
	<xsl:template match="/">
		<table cellpadding="2">
			<xsl:apply-templates/>
		</table>
	</xsl:template>
	<!-- template matching data -->
	<xsl:template match="SiteAudit">
		<tr>
			<td valign="top">
				<b>Site Type</b>
			</td>
			<td valign="top">
				<xsl:value-of select="@SiteType"/>
			</td>
			<td valign="top">
				<b>
					<xsl:value-of select="@SiteTitle"/>
				</b>
			</td>
		</tr>
		<xsl:apply-templates select="ProjectInfo">
			<xsl:with-param name="SiteType" select="@SiteType"/>
		</xsl:apply-templates>
		<xsl:apply-templates select="AuditInfo"/>
	</xsl:template>
	<xsl:template match="ProjectInfo">
		<xsl:param name="SiteType"/>
		<tr>
			<td valign="top">
				<b>
					<xsl:value-of select="$SiteType"/> Status</b>
			</td>
			<td valign="top">
				<xsl:value-of select="@ProjectStatus"/>
			</td>
			<td valign="top">
				<i>
					<xsl:value-of select="@ProjectComment"/>
				</i>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="AuditInfo">
		<tr >
			<td valign="top">
				<b>Final Audit</b>
			</td>
			<td valign="top">
				<xsl:if test="@FinalApproved='0'">Not specified</xsl:if>
				<xsl:if test="@FinalApproved!='0'">
					Audit # <xsl:value-of select="@FinalApproved"/>
				</xsl:if>
			</td>
			<td valign="top">
				<i>
					<xsl:value-of select="@FinalComment"/>
				</i>
			</td>
		</tr>
		<tr>
			<td valign="top">
				<b>Initial Audit</b>
			</td>
			<td valign="top">
				<xsl:if test="@Initial='0'">Not specified</xsl:if>
				<xsl:if test="@Initial!='0'">
					Audit # <xsl:value-of select="@Initial"/>
				</xsl:if>
			</td>
			<td valign="top">
				<i>
					<xsl:value-of select="@InitialComment"/>
				</i>
				
			</td>
		</tr>
	</xsl:template>
</xsl:stylesheet>